/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Engine2D.gui;

import Engine2D.input.InputAdapter;
import Engine2D.input.InputHandler;

/**
 *
 * @author Garys
 */
public abstract class AbstractComponent extends InputAdapter {
    
    private boolean hasFocus;
    /**
     * 
     */
    protected InputHandler input;
    
    /**
     * 
     * @param x
     * @param y
     */
    public abstract void render(int x, int y);
    /**
     * 
     * @param x
     * @param y
     */
    public abstract void setLocation(int x, int y);
    /**
     * 
     * @return
     */
    public abstract int getX();
    /**
     * 
     * @return
     */
    public abstract int getY();
    /**
     * 
     * @return
     */
    public abstract int getWidth();
    /**
     * 
     * @return
     */
    public abstract int getHeight();
    
    /**
     * 
     * @param focus
     */
    public void setFocus(boolean focus) {
        this.hasFocus = focus;
    }
    
    /**
     * 
     * @return
     */
    public boolean hasFocus(){
        return hasFocus;
    }
}
